
import RequestAndLoad from '../pages/request-and-load.vue';
import NotFoundPage from '../pages/404.vue';

import Tabs from '../pages/tabs/tabs';
import WealthDetailsPage from '../pages/wealth-details';
import BcdtBuy from '../pages/bcdt-buy';
import AssetsDetails from '../pages/assets-details';
import UserProfile from '../pages/user-profile';
import UpdatePhone from '../pages/update-phone';
import BindEmail from '../pages/bind-email';
import Verified from '../pages/verified';
import SetPayPassword from '../pages/set-pay-password';
import PayTypes from '../pages/pay-types';
import Quotes from '../pages/quotes';
import News from '../pages/news';
import C2cTransaction from '../pages/c2c-transaction';
import C2cRecord from '../pages/c2c-record';
import SetUserInfo from '../pages/set-user-info';
import MerchantsSettled from '../pages/merchants-settled';
import MyOrders from '../pages/my-orders';
import Setting from '../pages/setting';
import UpdatePassword from '../pages/update-password';
import UpdatePasswordForm from '../pages/update-pwd-form';
import ForgetPassword from '../pages/forget-pwd';
import AboutUs from '../pages/about-us';
import ContactUs from '../pages/contact-us';
import Promote from '../pages/promote';
import MyCommunity from '../pages/my-community';
import MsgCenter from '../pages/msg-center';
import RevenueBreakdown from '../pages/revenue-breakdown';
import LinkRedEnvelope from '../pages/link-red-envelope';
import BbExchange from '../pages/bb-exchange';
import SelectBi from '../pages/select-bi-page';
import Login from '../pages/login';
import Register from '../pages/register';
import UserAgreement from '../pages/user-agreement';
import LoginWithPhoneCode from '../pages/phone-code-login';
import TransactionDetails from '../pages/transaction-details';
import SelectPayType from '../pages/select-pay-type';
import AddPayType from '../pages/add-payType-page';
import Withdrawal from '../pages/withdrawal';
import WithdrawalAddress from '../pages/withdrawal-address';
import AddWithdrawalAddress from '../pages/add-withdrawal-address';
import Deposit from '../pages/deposit';
import PhoneRecharge from '../pages/phone-recharge';
import Mall from '../pages/mall';
import ProductDetails from '../pages/product-details';
import ConfigOrder from '../pages/confirm-order';
import MallAddress from '../pages/mall-address';
import AddMallAddress from '../pages/add-mall-address';
import Orders from '../pages/orders';
import Rule from '../pages/rule';
import HelpCenter from '../pages/help-center';
import BbExchangeRecord from '../pages/bb-exchange-record';
import ArticleDetails from '../pages/article-details';
import PleasePay from '../pages/please-pay';
import OrderDetails from '../pages/orderDetails';
import BuyOrSell from '../pages/buy-or-sell';
import TokenContractRecord from '../pages/token-contract-record';
import C2cOrderDetails from '../pages/c2c-order-details';
import EquitySwap from '../pages/equity-swap';
import EquitySwap2 from '../pages/equity-swap2';
import EquitySwapRecord from '../pages/equity-swap-record';
import GameList from '../pages/game-list';
import GameDeposit from '../pages/game-deposit';
import ListOfFundChanges from '../pages/list-of-fund-changes';
import MallRule from '../pages/mall-jifen';
import Rule2 from '../pages/rule2';
import MallJifenRecord from '../pages/mall-jifen-record';
import Download from '../pages/download';
import AssetsRecord from '../pages/assets-record';
import MyContract from '../pages/my-contract';
import Scan from '../pages/scan';


var routes = [
  {
    path: '/',
    component: Tabs,
  },
  {
    path: '/wealth-details/',
    component: WealthDetailsPage,
  },
  {
    path: '/bcdt-buy/',
    component: BcdtBuy,
  },
  {
    path: '/assets-details/',
    component: AssetsDetails,
  },
  {
    path: '/user-profile/',
    component: UserProfile,
  },
  {
    path: '/update-phone/',
    component: UpdatePhone,
  },
  {
    path: '/bind-email/',
    component: BindEmail,
  },
  {
    path: '/verified/',
    component: Verified,
  },
  {
    path: '/set-pay-password/',
    component: SetPayPassword,
  },
  {
    path: '/my-pay-types/',
    component: PayTypes,
  },
  {
    path: '/quotes/',
    component: Quotes,
  },
  {
    path: '/news/',
    component: News,
  },
  {
    path: '/c2c-transaction/',
    component: C2cTransaction,
  },
  {
    path: '/c2c-record/',
    component: C2cRecord,
  },
  {
    path: '/set-user-info/',
    component: SetUserInfo,
  },
  {
    path: '/merchants-settled/',
    component: MerchantsSettled,
  },
  {
    path: '/my-orders/',
    component: MyOrders,
  },
  {
    path: '/setting/',
    component: Setting,
  },
  {
    path: '/update-password/',
    component: UpdatePassword,
  },
  {
    path: '/update-password-form/',
    component: UpdatePasswordForm,
  },
  {
    path: '/forget-password/',
    component: ForgetPassword,
  },
  {
    path: '/about-us/',
    component: AboutUs,
  },
  {
    path: '/contact-us/',
    component: ContactUs,
  },
  {
    path: '/promote/',
    component: Promote,
  },
  {
    path: '/my-community/',
    component: MyCommunity,
  },
  {
    path: '/msg-center/',
    component: MsgCenter,
  },
  {
    path: '/revenue-breakdown/',
    component: RevenueBreakdown,
  },
  {
    path: '/link-red-envelope/',
    component: LinkRedEnvelope,
  },
  {
    path: '/bb-exchange/',
    component: BbExchange,
  },
  {
    path: '/select-bi/',
    component: SelectBi,
  },
  {
    path: '/login/',
    component: Login,
  },
  {
    path: '/login-with-phone-code/',
    component: LoginWithPhoneCode,
  },
  {
    path: '/register/',
    name: 'register',
    component: Register,
  },
  {
    path: '/user-agreement/',
    component: UserAgreement,
  },
  {
    path: '/transaction-details/',
    component: TransactionDetails,
  },
  {
    path: '/select-pay-type/',
    component: SelectPayType,
  },
  {
    path: '/add-pay-type/',
    component: AddPayType,
  },
  {
    path: '/withdrawal/',
    component: Withdrawal,
  },
  {
    path: '/withdrawal-address/',
    component: WithdrawalAddress,
  },
  {
    path: '/add-withdrawal-address/',
    component: AddWithdrawalAddress,
  },
  {
    path: '/deposit/',
    component: Deposit,
  },
  {
    path: '/phone-recharge/',
    component: PhoneRecharge,
  },
  {
    path: '/mall/',
    component: Mall,
  },
  {
    path: '/product-details/',
    component: ProductDetails,
  },
  {
    path: '/config-order/',
    component: ConfigOrder,
  },
  {
    path: '/mall-address/',
    component: MallAddress,
  },
  {
    path: '/add-mall-address/',
    component: AddMallAddress,
  },
  {
    path: '/orders/',
    component: Orders,
  },
  {
    path: '/rule/',
    component: Rule,
  },
  {
    path: '/help-center/',
    component: HelpCenter,
  },
  {
    path: '/bb-exchange-record/',
    component: BbExchangeRecord,
  },
  {
    path: '/article-details/',
    component: ArticleDetails,
  },
  {
    path: '/please-pay/',
    component: PleasePay,
  },
  {
    path: '/order-details/',
    component: OrderDetails,
  },
  {
    path: '/buy-or-sell/',
    component: BuyOrSell,
  },
  {
    path: '/token-contract-record/',
    component: TokenContractRecord,
  },
  {
    path: '/c2c-order-details/',
    component: C2cOrderDetails,
  },
  {
    path: '/equity-swap/',
    component: EquitySwap,
  },
  {
    path: '/equity-swap2/',
    component: EquitySwap2,
  },
  {
    path: '/equity-swap-record/',
    component: EquitySwapRecord,
  },
  {
    path: '/game-list/',
    component: GameList,
  },
  {
    path: '/game-deposit/',
    component: GameDeposit,
  },
  {
    path: '/list-of-fund-changes/',
    component: ListOfFundChanges,
  },
  {
    path: '/mall-jifen/',
    component: MallRule,
  },
  {
    path: '/rule2/',
    component: Rule2,
  },
  {
    path: '/mall-jifen-record/',
    component: MallJifenRecord,
  },
  {
    path: '/download/',
    component: Download,
  },
  {
    path: '/assets-record/',
    component: AssetsRecord,
  },
  {
    path: '/my-contract/',
    component: MyContract,
  },
  {
    path: '/scan/',
    component: Scan
  },



  {
    path: '/request-and-load/user/:userId/',
    async: function (routeTo, routeFrom, resolve, reject) {
      // Router instance
      var router = this;

      // App instance
      var app = router.app;

      // Show Preloader
      app.preloader.show();

      // User ID from request
      var userId = routeTo.params.userId;

      // Simulate Ajax Request
      setTimeout(function () {
        // We got user data from request
        var user = {
          firstName: 'Vladimir',
          lastName: 'Kharlampidi',
          about: 'Hello, i am creator of Framework7! Hope you like it!',
          links: [
            {
              title: 'Framework7 Website',
              url: 'http://framework7.io',
            },
            {
              title: 'Framework7 Forum',
              url: 'http://forum.framework7.io',
            },
          ]
        };
        // Hide Preloader
        app.preloader.hide();

        // Resolve route to load page
        resolve(
          {
            component: RequestAndLoad,
          },
          {
            context: {
              user: user,
            }
          }
        );
      }, 1000);
    },
  },
  {
    path: '(.*)',
    component: NotFoundPage,
  },
];

export default routes;
